package com.firebird.app.fejpsl.ui.fragment

import android.content.Intent
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.Fragment
import com.firebird.app.fejpsl.R
import com.firebird.app.fejpsl.ui.activity.sword.*
import kotlinx.android.synthetic.main.fragment_sword.*

/**
 * @author firebird
 * @date 2018/10/28
 * @desc 论剑
 */
class SwordFragment : Fragment() {
    //private var nav_friend:TextView?=null

    companion object {
        fun getInstance(): SwordFragment = SwordFragment()
    }

    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
                              savedInstanceState: Bundle?): View? {
       // var mContentView=layoutInflater.inflate(viewId(),null,false)
        return inflater.inflate(R.layout.fragment_sword, container, false)
    }

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)
        initListener()
    }
    private fun initListener(){
        mFriendKind.setOnClickListener {
                Intent(activity, SwordFriendActivity::class.java).run {
                    startActivity(this)
                }
        }
        mTopKind.setOnClickListener {
            Intent(activity, SwordTopActivity::class.java).run {
                startActivity(this)
            }
        }
        mCommunityKind.setOnClickListener {
            Intent(activity, SwordCommunityActivity::class.java).run {
                startActivity(this)
            }
        }
        mContestKind.setOnClickListener {
            Intent(activity, SwordContestActivity::class.java).run {
                startActivity(this)
            }
        }
        mLiveBroadcastKind.setOnClickListener {
            Intent(activity, LiveBroadcastActivity::class.java).run {
                startActivity(this)
            }
        }
        mVideoCourseKind.setOnClickListener {
            Intent(activity, VideoCourseActivity::class.java).run {
                startActivity(this)
            }
        }
        mNewsKind.setOnClickListener {
            Intent(activity, SwordNewsActivity::class.java).run {
                startActivity(this)
            }
        }
        mBbsKind.setOnClickListener {
            Intent(activity, SwordBbsActivity::class.java).run {
                startActivity(this)
            }
        }
    }

}